<template>
	<view>
		<view>
			<uni-search-bar @confirm="search" @input="input()" placeholder="名称搜索" :radius="100" clearButton="none" cancelButton="none" bgColor="#ffffff"></uni-search-bar>
		</view>
		<view style="display: flex;height: 40rpx;margin-top: 10rpx;" v-if="real">
			<view style="width: 374rpx;height: 32rpx;display: flex;border-right: 2rpx solid #D8D8D8;">
				<view style="margin: auto;display: flex;"@click="light" >
					<view style="font-size: 32rpx;line-height: 32rpx;">已自查</view>
					<view style="font-size: 32rpx;line-height: 32rpx;margin-left: 12rpx;">{{num}}</view>
				</view>	
			</view>
			<view style="width: 374rpx;height: 32rpx;display: flex;">
				<view style="margin: auto;display: flex;" @click="light1" >
					<view style="font-size: 32rpx;line-height: 32rpx;color: #388CFE;">未自查</view>
					<view style="font-size: 32rpx;line-height: 32rpx;margin-left: 12rpx;color: #388CFE;">{{num1}}</view>
				</view>	
			</view>
		</view>
		<view style="display: flex;height: 40rpx;margin-top: 10rpx;" v-else>
			<view style="width: 374rpx;height: 32rpx;display: flex;border-right: 2rpx solid #D8D8D8;">
				<view style="margin: auto;display: flex;"@click="light" >
					<view style="font-size: 32rpx;line-height: 32rpx;color: #388CFE;">已自查</view>
					<view style="font-size: 32rpx;line-height: 32rpx;margin-left: 12rpx;color: #388CFE;">{{num}}</view>
				</view>	
			</view>
			<view style="width: 374rpx;height: 32rpx;display: flex;">
				<view style="margin: auto;display: flex;" @click="light1" >
					<view style="font-size: 32rpx;line-height: 32rpx;">未自查</view>
					<view style="font-size: 32rpx;line-height: 32rpx;margin-left: 12rpx;">{{num1}}</view>
				</view>	
			</view>
		</view>
		<view style="width: 690rpx;height: 192rpx;margin-top: 30rpx;margin-left: 30rpx;background-color: #FFFFFF;border-radius: 12rpx;" v-if="real">
			<view @click="gotoXQ()">
				<view style="float: left;">
					<view style="font-size: 36rpx;line-height: 36rpx;margin-top: 30rpx;margin-left: 30rpx;">下应街道东兴社区避灾中心</view>
					<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">李关娣中学</view>
					<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">张三 12545457788</view>
				</view>
				<view style="width: 114rpx;height: 124rpx;margin-top: 17rpx;float: right;margin-right: 30rpx;margin-top: 34rpx;">
					<image src="../../../static/coordinate@3x.png" style="width: 52rpx;height: 76rpx;padding-left: 32rpx;"></image>
					<view style="font-size: 32rpx;line-height: 32rpx;text-align: center;color: #FB9A17;">10.2km</view>
				</view>
			</view>
		</view>
		<view v-else>
			<view style="width: 690rpx;height: 372rpx;margin-top: 30rpx;margin-left: 30rpx;background-color: #FFFFFF;border-radius: 12rpx;"v-if="yinhuan!=0">
				<view >
					<view>
						<view style="display: flex;">
							<view style="font-size: 36rpx;line-height: 36rpx;margin-top: 30rpx;margin-left: 30rpx;">下应街道东兴社区避灾中心</view>
							<view style="width: 108rpx;height: 36rpx;background-color: rgba(255, 77, 79, 0.12);color: rgba(255, 77, 79, 1);font-size: 24rpx;line-height:36rpx ;margin-left: 10rpx;margin-top: 30rpx;text-align: center;border-radius: 4rpx;">{{yinhuan}}处隐患</view>
						</view>
						<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">李关娣中学</view>
						<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">张三 12545457788</view>
					</view>
					<view style="color: #999999;font-size: 24rpx;line-height: 24rpx;margin-left: 30rpx;margin-top: 20rpx;">检查时间：2021-12-01 09:27:44</view>
					<view style="color: #999999;font-size: 24rpx;line-height: 24rpx;margin-left: 30rpx;margin-top: 20rpx;">检查人：刘海涛</view>
					<view style="width: 690rpx;height: 1rpx;background-color: #D8D8D8;margin-top: 32rpx;"></view>
					<view style="display: flex;" @click="gotoRD()">
						<image src="../../../static/iconCK@3x.png" style="width: 48rpx;height: 48rpx;margin-top: 22rpx;margin-left: 194rpx;"></image>
						<view style="font-size: 32rpx;line-height: 32rpx;margin-left: 2rpx;margin-top: 30rpx;color: #388CFE;">查看隐患整改记录</view>
					</view>
				</view>
			</view>
			<view style="width: 690rpx;height: 276rpx;margin-top: 30rpx;margin-left: 30rpx;background-color: #FFFFFF;border-radius: 12rpx;"v-else>
				<view>
					<view>
						<view style="font-size: 36rpx;line-height: 36rpx;padding-top: 30rpx;margin-left: 30rpx;">下应街道东兴社区避灾中心</view>
						<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">李关娣中学</view>
						<view style="font-size: 28rpx;line-height: 28rpx;margin-top: 20rpx;margin-left: 30rpx;color: #666666;">张三 12545457788</view>
					</view>
					<view style="color: #999999;font-size: 24rpx;line-height: 24rpx;margin-left: 30rpx;margin-top: 20rpx;">检查时间：2021-12-01 09:27:44</view>
					<view style="color: #999999;font-size: 24rpx;line-height: 24rpx;margin-left: 30rpx;margin-top: 20rpx;">检查人：刘海涛</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				real:true,
				active:true,
				yinhuan:'5'
			}
		},
		methods: {
			input(res){
				console.log(res);
			},
			search(res){
				console.log(res.value);
				
			},
			light(){
				this.real=false,
				this.active=false
			},
			light1(){
				this.real=true,
				this.active=true
			},
			gotoXQ(){
				uni.navigateTo({
					url:'../../list/xiangqing'
				})
			},
			gotoRD(){
				uni.navigateTo({
					url:'../JCyinhuanZG'
				})
			}
		},
		onLoad(options) {
			this.real=options.real
		}
	}
</script>

<style>
page{background-color: #F5F5F8;}
</style>
